
import Data.List
import System(getArgs)

main :: IO ()
main = do args <- getArgs
          s <- getContents
          let t = read $ args !! 0 :: Float
          let a = read $ args !! 1 :: Float
          let b = read $ args !! 2 :: Float
          let dists = map read $ words s :: [Float]
          mapM_ print (map (\x -> if x < t then a else b) dists)